<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="MessageViewDlg" widgetVar="MessageViewDialog" modal="true" resizable="false" appendToBody="true" header="#{bundle.ViewMessageTitle}">

            <h:form id="MessageViewForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{messageController.selected != null}">

                        <h:outputText value="#{bundle.ViewMessageLabel_idMessage}"/>
                        <h:outputText value="#{messageController.selected.idMessage}" title="#{bundle.ViewMessageTitle_idMessage}"/>

                        <h:outputText value="#{bundle.ViewMessageLabel_tittle}"/>
                        <h:outputText value="#{messageController.selected.tittle}" title="#{bundle.ViewMessageTitle_tittle}"/>

                        <h:outputText value="#{bundle.ViewMessageLabel_body}"/>
                        <h:outputText value="#{messageController.selected.body}" title="#{bundle.ViewMessageTitle_body}"/>

                        <h:outputText value="#{bundle.ViewMessageLabel_date}"/>
                        <h:outputText value="#{messageController.selected.date}" title="#{bundle.ViewMessageTitle_date}">
                            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                        </h:outputText>

                        <h:outputText value="#{bundle.ViewMessageLabel_userMessages}"/>
                        <h:outputText value="#{messageController.selected.userMessages.messageIdmessage}"/>
                    </p:panelGrid>
                    <p:commandButton value="#{bundle.Close}" onclick="MessageViewDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
